<?php

namespace app\admin\model\car\sudden;

use think\Model;

class Task extends Model
{
    // 表名
    protected $name = 'car_sudden_task';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    
    // 追加属性
    protected $append = [

    ];




    public function getStatusList()
    {
        return ['0' => __('State 0'),'1' => __('State 1'),'2' => __('State 2')];
    }





    public function user()
    {
        return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function unit()
    {
        return $this->belongsTo('Unit', 'uint_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function carinfo()
    {
        return $this->belongsTo('Carinfo', 'carinfo_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
